<? ini_set('memory_limit','30M');?>
<style>
body { margin-top:25; font-size:12px;}
		.b_line { border-bottom:1px #AAAAAA solid; height:25px; font-size:14px}
		.border_t{border-top:1px inset #EEE;}
		.border_b{border-bottom:1px inset #EEE;}
		.border_l{border-left:1px inset #EEE;}
		.border_r{border-right:1px inset #EEE;}
		.xx:hover {cursor:pointer; background:#99FF99;}
		.xy:hover {cursor:pointer; background:#F30;}
		.box{border:1px solid #003}
		.box_lbr{border:1px solid #003; border-top:none}
		.box_ltr{border:1px solid #003; border-bottom:none}
		.box_l{border-left:1px solid #003;}
		.box_r{border-right:1px solid #003;}
		.box_lb{border-left:1px solid #003;border-bottom:1px solid #003;}
		.box_rb{border-right:1px solid #003;border-bottom:1px solid #003;}
		.list_genap{cursor:pointer; background-color:#6699FF;}
		.list_ganjil{cursor:pointer; background-color:#9966FF;}
		.list_closed{cursor:pointer; background-color:#FF99FF;}
</style>
<table style='border-collapse:collapse' width='99%'>
	<tr align='center'><td colspan='8'><h2><?=$coy;?></h2><?=$add;?></td></tr>
	<tr align='center'><td colspan='8'><h1>BUKU JURNAL</h1></td></tr>
	<tr class='list_genap box' align='center'>
		<td rowspan='2' width='10%' class='box'>Tanggal</td>
		<td rowspan='2' width='30%'class='box' >Kode Rekening</td>
		<td rowspan='2' width='15%' class='box'>No. Bukti</td>
		<td rowspan='2' width='10%' class='box'>Reff.</td>
		<td colspan='2' width='30%'class='box box_r'>Jumlah</td>
	</tr>
	<tr class='list_genap box' align='center'>
		<td class='box' width="15%">Debet</td>
		<td class='box box_r' width="15%">Kredit</td>
	</tr>
	<tr class='box' align='center'>
		<td class='box'>1</td>
		<td class='box'>2</td>
		<td class='box'>3</td>
		<td class='box'>4</td>
		<td class='box'>5</td>
		<td class='box box_r'>6</td>
	</tr>
	<? $t_debet=0;$t_kredit=0;
	foreach($lst as $r)
	{
	?>
	<tr class='box'>
		<td align='center' class='box'><?=tglFromSql($r->tgljurnal);?></td>
		<td align='' class='box'><?=($r->koderek);?></td>
		<td align='' class='box'><?=($r->nobukti);?></td>
		<td align='' class='box'><?=($r->reff);?></td>
		<td align='right' class='box'><?=number_format($r->debet,2);?></td>
		<td align='right' class='box'><?=number_format($r->kredit,2);?></td>
	</tr>
	<?	
	$t_debet=($t_debet+$r->debet);
	$t_kredit=($t_kredit+$r->kredit);
	}
	?>
	<tr class='box'>
		<td class='box' align='right' colspan='4'>Jumlah<?=nbs(3);?></td>
		<td class='box' align='right'><?=number_format($t_debet,2);?></td>
		<td class='box' align='right'><?=number_format($t_kredit,2);?></td>
	</tr>
		<!-----Footer tanda tangan ---->
			<? $kt=explode("-",$kota);?>
			<tr><td colspan='4'></td><td colspan='2' align='center'><?=$kt[0].", ". date('d F Y');?></td></tr>
			<tr><td colspan='4' height="50px">&nbsp;</td><td colspan='2' align='center' valign='top'><?='Keuangan,';?></td></tr>
			<tr><td colspan='4'></td><td colspan='2' align='center'><?=$keua;?></td></tr>
</table>